<extend name="Index/index" />
<block name="nav1">
    <ul class="breadcrumb">
        <li>
            <i class="icon-home home-icon"></i>
            <a href="#">Admin</a>
        </li>
        <li class="active">优惠劵表</li>
    </ul><!-- .breadcrumb -->
</block>

<block name="nav2">
        <h1>
            优惠劵表
        </h1>
</block>
<block name="main">
    <table class="table table-hover mt20">
        <tr>
            <td>优惠劵id</td>
            <td>商品id</td>
            <td>折扣标准</td>
            <td>折扣值</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
        <foreach name="list" item="v">
        <tr>
            <td><{$v.id}></td>
            <td><{$v.gid}></td>
            <td><{$v.one}></td>
            <td><{$v.two}></td>
            <td>
                <if condition="$v['status'] eq 1">
                <a href="<{:U('status',array('s'=>2,'id'=>$v['id']))}>">激活</a>
                <else/>
                <a href="<{:U('status',array('s'=>1,'id'=>$v['id']))}>">冻结</a>
                </if>
            </td>
            <td class="col-md-2">
                <a href="<{:U('edit',array('id'=>$v['id']))}>" class="btn btn-primary">编辑</a>
                <a href="<{:U('del',array('id'=>$v['id']))}>" class="btn btn-danger">删除</a>
            </td>
        </tr>
        </foreach>
        
    </table>
    </block>
